package router

import (
	"github.com/gin-gonic/gin"
	"project-im/config"
	"project-im/internal/api/user"
	"project-im/tools"
)

func UserRouter(router *gin.RouterGroup) {
	userModel := router.Group("user").Use(tools.JWTAuth(config.AppConfig.Jwt.Key))
	{
		userModel.GET("self", user.InfoUser)
		userModel.PUT("update", user.UserInfo)
		userModel.GET("findByName", user.FindFriendByName)
		userModel.GET("find/:id", user.Find)
	}
}
